home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / BIOS32.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  882b  |  35 lines

  1. /*
  2.  *    This is only a stub file to make drivers not yet converted to the new
  3.  *    PCI probing mechanism work. [mj]
  4.  */
  5.  
  6. #ifndef BIOS32_H
  7. #define BIOS32_H
  8.  
  9. #include <linux/pci.h>
  10.  
  11. #warning This driver uses the old PCI interface, please fix it (see Documentation/pci.txt)
  12.  
  13. extern inline int __pcibios_read_irq(unsigned char bus, unsigned char dev_fn, unsigned char *to)
  14. {
  15.     struct pci_dev *pdev = pci_find_slot(bus, dev_fn);
  16.     if (!pdev) {
  17.         *to = 0;
  18.         return PCIBIOS_DEVICE_NOT_FOUND;
  19.     } else {
  20.         *to = pdev->irq;
  21.         return PCIBIOS_SUCCESSFUL;
  22.     }
  23. }
  24.  
  25. extern inline int __pcibios_read_config_byte(unsigned char bus,
  26.     unsigned char dev_fn, unsigned char where, unsigned char *to)
  27. {
  28.     return pcibios_read_config_byte(bus, dev_fn, where, to);
  29. }
  30.  
  31. #define pcibios_read_config_byte(b,d,w,p) \
  32.     (((w) == PCI_INTERRUPT_LINE) ? __pcibios_read_irq(b,d,p) : __pcibios_read_config_byte(b,d,w,p))
  33.  
  34. #endif
  35.